#ifndef MYTIMER_H_
#define MYTIMER_H_

#include <e32base.h>

class CMyTimer;
class MTimerCallback
	{
public:
		// Handler calls when image manipulation is completed
		virtual void OnTimer(CMyTimer* timer, int eventid, int extrapara) = 0;
	};

class CMyTimer : public CActive
{
public:
	static CMyTimer* NewL(MTimerCallback* callback, int eventid, int extrapara = 0);
	static CMyTimer* NewLC(MTimerCallback* callback, int eventid, int extrapara = 0);
	~CMyTimer(); 
	void Activate();
private:
	CMyTimer(MTimerCallback* callback, int eventid, int extrapara = 0); 
	void ConstructL(); 
	void StartAO(); 
	void DoCancel(); 
	void RunL(); 
public:
	RTimer iTimer;
	TRequestStatus status;
	TTimeIntervalMicroSeconds32 m_interval;
	int m_nTest;
private:
	MTimerCallback& m_callback;
	int m_eventid;
	int m_extrapara;
};

#endif /*MYTIMER_H_*/
